package org.pidan.basic.designModel.observer;

/**
 * {@code @description}: 观察者实现类，具体观察者
 * {@code @author}: huangyuxin
 * {@code @date}: 2023-11-17
 */
public class ObserverImpl implements Observer {

    // 具体观察者的属性
    private int myState;

    @Override
    public void update(int state) {

        myState = state;
        System.out.println("收到消息，myState值修改为：" + state);
    }

    public int getMyState() {
        return myState;
    }
}
